﻿using Data.Common;
using Data.Model;
using Data.ViewModel;

namespace DataAccess.SystemManage
{
    public interface ISysUser
    {
        ResultInfo<PagingDataSet<UserView>> GetUsers(int pageIndex, int pageSize, string userName);
        ResultInfo<int> ModifierUserPassword(string userName, string oldPassword, string newPassword);
        ResultInfo<jsh_user> GetUser(int id);
        ResultInfo<jsh_user> GetUser(string userName);
        ResultInfo<PagingDataSet<UserRole>> GetUserRoles(int pageIndex, int pageSize, int userid);
        ResultInfo<PagingDataSet<Role>> GetUserUnRoles(int userid, int pageIndex, int pageSize);
        ResultInfo<int> CreateUpdateUser(jsh_user user);
        ResultInfo<int> CreateUpdateUserRole(UserRole ur);
        ResultInfo<bool> DeleteUser(int id);
        ResultInfo<bool> DeleteUserRole(int id);
        ResultInfo<jsh_user> Login(string userName, string password);

        ResultInfo<PagingDataSet<UserView>> GetMulUsers(int pageIndex, int pageSize, string userName, int roleId,
                                                        int priId, string resName);
    }
}
